home *** CD-ROM | disk | FTP | other *** search
- on rotatesprite thesprite
- set existlist to []
- set maxsprite to getmaxlistsprite()
- set minsprite to getminlistsprite()
- set topsprite to 1
- set backsprite to 120
- repeat with n = minsprite to maxsprite
- if the memberNum of sprite n <> 0 then
- set topsprite to max(n, topsprite)
- set backsprite to min(n, backsprite)
- add(existlist, n)
- end if
- end repeat
- if topsprite > thesprite then
- set countnum to count(existlist)
- set startpos to getPos(existlist, thesprite)
- set endpos to countnum
- set m to getAt(existlist, startpos)
- set sx0 to the locH of sprite m
- set sy0 to the locV of sprite m
- set themember to the memberNum of sprite m
- repeat with n = startpos to endpos - 1
- set m0 to getAt(existlist, n + 1)
- set memberNum to the memberNum of sprite m0
- set sx to the locH of sprite m0
- set sy to the locV of sprite m0
- set m1 to getAt(existlist, n)
- set the memberNum of sprite m1 to memberNum
- set the locH of sprite m1 to sx
- set the locV of sprite m1 to sy
- end repeat
- set m to getAt(existlist, countnum)
- set the memberNum of sprite m to themember
- set the locH of sprite m to sx0
- set the locV of sprite m to sy0
- updateStage()
- end if
- end
-
- on getmaxlistsprite
- global grotatesprite
- set thelist to grotatesprite
- set result to 120
- if count(thelist) > 0 then
- set result to getProp(thelist, #max)
- end if
- return result
- end
-
- on getminlistsprite
- global grotatesprite
- set thelist to grotatesprite
- set result to 1
- if count(thelist) > 0 then
- set result to getProp(thelist, #min)
- end if
- return result
- end
-
- on puppetspriteon
- set minsprite to getminlistsprite()
- set maxsprite to getmaxlistsprite()
- repeat with n = minsprite to maxsprite
- set the puppet of sprite n to 1
- end repeat
- end
-
- on puppetspriteoff
- set minsprite to getminlistsprite()
- set maxsprite to getmaxlistsprite()
- repeat with n = minsprite to maxsprite
- set the puppet of sprite n to 0
- end repeat
- end
-